package com.wanxi.faceobject.template.test2;

public class EmployeeTest {

    public static void main(String[] args) {
        Employee[] employees = new Employee[3];
        employees[0] = new SalaryEmployee("陈明", 20130050, new MyDate(1995, 7, 21), 15000);

        employees[1] = new HourEmployee("王海云", 20130053, new MyDate(1998, 7, 1), 240,20);

        employees[2] = new SalaryEmployee("江姐", 20130055, new MyDate(1995, 8, 21), 16000);
         int month = 7;
        for (int i = 0; i < employees.length; i++) {
            System.out.println(employees[i].getInfo());
            System.out.println(employees[i].earnings());
            if(month == employees[i].getBirthday().getMonth()){
                System.out.println(employees[i].getInfo());
                System.out.println(employees[i].earnings()+1000 + "元");
            }

        }


        System.out.println(employees[0]);
        System.out.println(employees[1]);


    }


}
